{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## WEEK5 高德地图api调用作业"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 地理编码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "key ='e1f0b900eac097c28f03f98944417aca'\n",
    "def geo(address:str,city=None)-> dict:\n",
    "    parameters = {'key':key,\n",
    "                  'city':city,\n",
    "                  'citylimit': True,\n",
    "                  'address':address\n",
    "                   } \n",
    "    r = requests.get (\"https://restapi.amap.com/v3/geocode/geo?parameters\", params=parameters)\n",
    "    data = r.json()['geocodes'][0]['location']\n",
    "    return data\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'formatted_address': '福建省宁德市蕉城区万达华城',\n",
       " 'country': '中国',\n",
       " 'province': '福建省',\n",
       " 'citycode': '0593',\n",
       " 'city': '宁德市',\n",
       " 'district': '蕉城区',\n",
       " 'township': [],\n",
       " 'neighborhood': {'name': [], 'type': []},\n",
       " 'building': {'name': [], 'type': []},\n",
       " 'adcode': '350902',\n",
       " 'street': [],\n",
       " 'number': [],\n",
       " 'location': '119.540044,26.649481',\n",
       " 'level': '兴趣点'}"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "parameters = {'key':key,\n",
    "            'city':\"宁德\",\n",
    "            'citylimit': True,\n",
    "            'address':\"宁德市蕉城区万达华城\"\n",
    "                   } \n",
    "r = requests.get (\"https://restapi.amap.com/v3/geocode/geo?parameters\", params=parameters)\n",
    "r.json()['geocodes'][0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'119.540044,26.649481'"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geo(\"福建省宁德市蕉城区万达华城\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'119.539005,26.651663'"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geo(\"福建省宁德市蕉城区万达广场\",\"宁德\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 路径规划"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "def walking(origin:str,destination:str)->dict:\n",
    "    parameters = {\n",
    "        'key':key,\n",
    "        'origin':origin,\n",
    "        'destination':destination,\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get(\"https://restapi.amap.com/v3/direction/walking?parameters\",params = parameters)\n",
    "    data = r.json()['route']['paths'][0]['steps']\n",
    "    for i in range(0,len(data)):\n",
    "        print(data[int(i)]['instruction'])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "向东南步行48米左转\n",
      "向东步行80米左转\n",
      "沿侨兴路向北步行253米左转\n",
      "向西步行63米左转\n",
      "沿宁德金街向西南步行86米到达目的地\n"
     ]
    }
   ],
   "source": [
    "walking(geo(\"福建省宁德市蕉城区万达华城\",\"宁德\"),geo(\"福建省宁德市蕉城区万达广场\",\"宁德\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 也许包含AI的自动规划功能"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 行政区域查询"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "def district(keywords:str):\n",
    "    parameters = {\n",
    "        'key':key,\n",
    "        'keywords':keywords,\n",
    "        \"subdistrict\":\"3\",\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/config/district?parameters\", params=parameters)\n",
    "    data = r.json()['districts'][0]['districts']\n",
    "    print(\"----\"+keywords + \"有以下几个行政区域----\")\n",
    "    for i in data:\n",
    "        print(i['name'])\n",
    "    return \n",
    "    \n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "----福建有以下几个行政区域----\n",
      "福州市\n",
      "宁德市\n",
      "龙岩市\n",
      "南平市\n",
      "厦门市\n",
      "漳州市\n",
      "莆田市\n",
      "泉州市\n",
      "三明市\n"
     ]
    }
   ],
   "source": [
    "district('福建')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 搜索POI"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [],
   "source": [
    "def poi(keywords:str,city:str):\n",
    "    parameters = {\n",
    "        'key':key,\n",
    "        'city':city,\n",
    "        'keywords':keywords,\n",
    "        'output':'json',\n",
    "        \n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/place/text?parameters\", params=parameters)\n",
    "    data = r.json()\n",
    "    pois = []\n",
    "    pois.extend(data['pois'])\n",
    "    import pandas as pd\n",
    "    df_input = pd.DataFrame(pois)\n",
    "    return df_input"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>parent</th>\n",
       "      <th>childtype</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>typecode</th>\n",
       "      <th>biz_type</th>\n",
       "      <th>address</th>\n",
       "      <th>location</th>\n",
       "      <th>tel</th>\n",
       "      <th>...</th>\n",
       "      <th>cityname</th>\n",
       "      <th>adname</th>\n",
       "      <th>importance</th>\n",
       "      <th>shopid</th>\n",
       "      <th>shopinfo</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>photos</th>\n",
       "      <th>biz_ext.rating</th>\n",
       "      <th>biz_ext.cost</th>\n",
       "      <th>biz_ext.meal_ordering</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>B0251030CM</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>南际牛肉水粉(南际店)</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>南漈路31号(近妇幼保健院)</td>\n",
       "      <td>119.525258,26.653500</td>\n",
       "      <td>13626997829;13950540202</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>4.0</td>\n",
       "      <td>12.00</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>B0FFHBKV14</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>小东门牛肉水粉(福安店)</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>阳头富阳路38号</td>\n",
       "      <td>119.642638,27.077921</td>\n",
       "      <td>13959417128;13459389549</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福安市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>4.3</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>B0FFHBGM7A</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>拓荣吴记牛肉水粉(宁德店)</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "      <td>diner</td>\n",
       "      <td>东侨经济开发区坪塔西路6号D幢D1-21</td>\n",
       "      <td>119.540414,26.655794</td>\n",
       "      <td>13959317416</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>4.8</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>B0FFGI2E2L</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>福鼎小吃(万达金街店)</td>\n",
       "      <td>餐饮服务;中餐厅;特色/地方风味餐厅</td>\n",
       "      <td>050118</td>\n",
       "      <td>diner</td>\n",
       "      <td>天湖东路1号万达金街5-1063(四号门正对面)</td>\n",
       "      <td>119.540476,26.649324</td>\n",
       "      <td>18150238322;13774779702</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.5</td>\n",
       "      <td>13.00</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>B0FFGI2E4G</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>福鼎友小吃店</td>\n",
       "      <td>餐饮服务;中餐厅;特色/地方风味餐厅</td>\n",
       "      <td>050118</td>\n",
       "      <td>diner</td>\n",
       "      <td>站前路30号鸿福豪门3号楼137店面</td>\n",
       "      <td>119.541137,26.636966</td>\n",
       "      <td>15860688884;13959397419</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.5</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>B0FFHDZM8S</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>肉菜面店</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>东桥经济开发区城市公馆1号112店</td>\n",
       "      <td>119.544743,26.659764</td>\n",
       "      <td>13959300879</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.3</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>B0FFFP3MKG</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>鞍福水粉</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>815西路2号东方大厦1号楼一层107-2</td>\n",
       "      <td>119.524688,26.658720</td>\n",
       "      <td>13809578343</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.5</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>B0FFG0K4EK</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>牛肉水粉(高级中学店)</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>东侨经济开发区高级中学东侧南华花苑C块01号106</td>\n",
       "      <td>119.547557,26.662807</td>\n",
       "      <td>18350377337</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.5</td>\n",
       "      <td>10.00</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>B0FFG44SGD</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>柘荣牛肉水粉店(人民影院后街店)</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>南环路好运商城一层后排第四间</td>\n",
       "      <td>119.527862,26.661987</td>\n",
       "      <td>13860399167;13959316378</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.5</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>B0FFGZSACY</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>柘荣牛肉水粉(单石碑店)</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>单石碑路41号</td>\n",
       "      <td>119.519060,26.670666</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.5</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B0FFIPOLQ7</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>五里亭牛肉水粉</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>东侨开发区闽东中路21号附近</td>\n",
       "      <td>119.544262,26.662716</td>\n",
       "      <td>15859363156</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.5</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>B0FFGHGL01</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>陈百万酸菜鱼粉丝(淡水桥店)</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "      <td>diner</td>\n",
       "      <td>桐城街道太姥大道484号</td>\n",
       "      <td>120.212837,27.309477</td>\n",
       "      <td>15259312115</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福鼎市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>5.0</td>\n",
       "      <td>12.00</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>B0FFI0ROLA</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>爱勇酸菜鱼粉丝(海口路店)</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>桐城街道海口路125号</td>\n",
       "      <td>120.221195,27.315469</td>\n",
       "      <td>15659245671;15059315444</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福鼎市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.5</td>\n",
       "      <td>17.00</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>B0FFHG4XK7</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>阿勇酸菜鱼粉丝(海口路信用社)</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "      <td>diner</td>\n",
       "      <td>宏利五幢2号</td>\n",
       "      <td>120.221117,27.315381</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福鼎市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.0</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>B0FFHDW4L6</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>猪猪虾水煮外卖</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>下宅园下路弄109-2号第一间至第二间</td>\n",
       "      <td>119.534370,26.653031</td>\n",
       "      <td>15159370959</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.5</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>B0FFFQ0O2M</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>春妹牛肉店(海口路店)</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>桐城海口路316号</td>\n",
       "      <td>120.221914,27.312186</td>\n",
       "      <td>0593-7851368;13055580328</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福鼎市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.5</td>\n",
       "      <td>31.00</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>B0FFH6A5SB</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>黄家牛肉铺</td>\n",
       "      <td>购物服务;购物相关场所;购物相关场所</td>\n",
       "      <td>060000</td>\n",
       "      <td>[]</td>\n",
       "      <td>山前虹滨路79-81号</td>\n",
       "      <td>120.219751,27.329868</td>\n",
       "      <td>0593-7802578;0593-7378837;13023828282</td>\n",
       "      <td>...</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福鼎市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "      <td>3.5</td>\n",
       "      <td>10.00</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>17 rows × 22 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            id parent childtype              name                type  \\\n",
       "0   B0251030CM     []        []       南际牛肉水粉(南际店)        餐饮服务;中餐厅;中餐厅   \n",
       "1   B0FFHBKV14     []        []      小东门牛肉水粉(福安店)        餐饮服务;中餐厅;中餐厅   \n",
       "2   B0FFHBGM7A     []        []     拓荣吴记牛肉水粉(宁德店)    餐饮服务;餐饮相关场所;餐饮相关   \n",
       "3   B0FFGI2E2L     []        []       福鼎小吃(万达金街店)  餐饮服务;中餐厅;特色/地方风味餐厅   \n",
       "4   B0FFGI2E4G     []        []            福鼎友小吃店  餐饮服务;中餐厅;特色/地方风味餐厅   \n",
       "5   B0FFHDZM8S     []        []              肉菜面店        餐饮服务;中餐厅;中餐厅   \n",
       "6   B0FFFP3MKG     []        []              鞍福水粉        餐饮服务;中餐厅;中餐厅   \n",
       "7   B0FFG0K4EK     []        []       牛肉水粉(高级中学店)        餐饮服务;快餐厅;快餐厅   \n",
       "8   B0FFG44SGD     []        []  柘荣牛肉水粉店(人民影院后街店)        餐饮服务;中餐厅;中餐厅   \n",
       "9   B0FFGZSACY     []        []      柘荣牛肉水粉(单石碑店)        餐饮服务;快餐厅;快餐厅   \n",
       "10  B0FFIPOLQ7     []        []           五里亭牛肉水粉        餐饮服务;快餐厅;快餐厅   \n",
       "11  B0FFGHGL01     []        []    陈百万酸菜鱼粉丝(淡水桥店)    餐饮服务;餐饮相关场所;餐饮相关   \n",
       "12  B0FFI0ROLA     []        []     爱勇酸菜鱼粉丝(海口路店)        餐饮服务;中餐厅;中餐厅   \n",
       "13  B0FFHG4XK7     []        []   阿勇酸菜鱼粉丝(海口路信用社)    餐饮服务;餐饮相关场所;餐饮相关   \n",
       "14  B0FFHDW4L6     []        []           猪猪虾水煮外卖        餐饮服务;快餐厅;快餐厅   \n",
       "15  B0FFFQ0O2M     []        []       春妹牛肉店(海口路店)        餐饮服务;中餐厅;中餐厅   \n",
       "16  B0FFH6A5SB     []        []             黄家牛肉铺  购物服务;购物相关场所;购物相关场所   \n",
       "\n",
       "   typecode biz_type                    address              location  \\\n",
       "0    050100    diner             南漈路31号(近妇幼保健院)  119.525258,26.653500   \n",
       "1    050100    diner                   阳头富阳路38号  119.642638,27.077921   \n",
       "2    050000    diner       东侨经济开发区坪塔西路6号D幢D1-21  119.540414,26.655794   \n",
       "3    050118    diner   天湖东路1号万达金街5-1063(四号门正对面)  119.540476,26.649324   \n",
       "4    050118    diner         站前路30号鸿福豪门3号楼137店面  119.541137,26.636966   \n",
       "5    050100    diner          东桥经济开发区城市公馆1号112店  119.544743,26.659764   \n",
       "6    050100    diner      815西路2号东方大厦1号楼一层107-2  119.524688,26.658720   \n",
       "7    050300    diner  东侨经济开发区高级中学东侧南华花苑C块01号106  119.547557,26.662807   \n",
       "8    050100    diner             南环路好运商城一层后排第四间  119.527862,26.661987   \n",
       "9    050300    diner                    单石碑路41号  119.519060,26.670666   \n",
       "10   050300    diner             东侨开发区闽东中路21号附近  119.544262,26.662716   \n",
       "11   050000    diner               桐城街道太姥大道484号  120.212837,27.309477   \n",
       "12   050100    diner                桐城街道海口路125号  120.221195,27.315469   \n",
       "13   050000    diner                     宏利五幢2号  120.221117,27.315381   \n",
       "14   050300    diner        下宅园下路弄109-2号第一间至第二间  119.534370,26.653031   \n",
       "15   050100    diner                  桐城海口路316号  120.221914,27.312186   \n",
       "16   060000       []                山前虹滨路79-81号  120.219751,27.329868   \n",
       "\n",
       "                                      tel  ... cityname adname importance  \\\n",
       "0                 13626997829;13950540202  ...      宁德市    蕉城区         []   \n",
       "1                 13959417128;13459389549  ...      宁德市    福安市         []   \n",
       "2                             13959317416  ...      宁德市    蕉城区         []   \n",
       "3                 18150238322;13774779702  ...      宁德市    蕉城区         []   \n",
       "4                 15860688884;13959397419  ...      宁德市    蕉城区         []   \n",
       "5                             13959300879  ...      宁德市    蕉城区         []   \n",
       "6                             13809578343  ...      宁德市    蕉城区         []   \n",
       "7                             18350377337  ...      宁德市    蕉城区         []   \n",
       "8                 13860399167;13959316378  ...      宁德市    蕉城区         []   \n",
       "9                                      []  ...      宁德市    蕉城区         []   \n",
       "10                            15859363156  ...      宁德市    蕉城区         []   \n",
       "11                            15259312115  ...      宁德市    福鼎市         []   \n",
       "12                15659245671;15059315444  ...      宁德市    福鼎市         []   \n",
       "13                                     []  ...      宁德市    福鼎市         []   \n",
       "14                            15159370959  ...      宁德市    蕉城区         []   \n",
       "15               0593-7851368;13055580328  ...      宁德市    福鼎市         []   \n",
       "16  0593-7802578;0593-7378837;13023828282  ...      宁德市    福鼎市         []   \n",
       "\n",
       "   shopid shopinfo poiweight  \\\n",
       "0      []        0        []   \n",
       "1      []        0        []   \n",
       "2      []        0        []   \n",
       "3      []        0        []   \n",
       "4      []        0        []   \n",
       "5      []        0        []   \n",
       "6      []        0        []   \n",
       "7      []        0        []   \n",
       "8      []        0        []   \n",
       "9      []        0        []   \n",
       "10     []        0        []   \n",
       "11     []        0        []   \n",
       "12     []        0        []   \n",
       "13     []        0        []   \n",
       "14     []        0        []   \n",
       "15     []        0        []   \n",
       "16     []        0        []   \n",
       "\n",
       "                                               photos biz_ext.rating  \\\n",
       "0   [{'url': 'http://store.is.autonavi.com/showpic...            4.0   \n",
       "1   [{'url': 'http://store.is.autonavi.com/showpic...            4.3   \n",
       "2   [{'url': 'http://store.is.autonavi.com/showpic...            4.8   \n",
       "3   [{'url': 'http://store.is.autonavi.com/showpic...            3.5   \n",
       "4   [{'url': 'http://store.is.autonavi.com/showpic...            3.5   \n",
       "5   [{'url': 'http://store.is.autonavi.com/showpic...            3.3   \n",
       "6   [{'url': 'http://store.is.autonavi.com/showpic...            3.5   \n",
       "7   [{'url': 'http://store.is.autonavi.com/showpic...            3.5   \n",
       "8   [{'url': 'http://store.is.autonavi.com/showpic...            3.5   \n",
       "9   [{'url': 'http://store.is.autonavi.com/showpic...            3.5   \n",
       "10  [{'url': 'http://store.is.autonavi.com/showpic...            3.5   \n",
       "11                                                 []            5.0   \n",
       "12  [{'url': 'http://store.is.autonavi.com/showpic...            3.5   \n",
       "13  [{'url': 'http://store.is.autonavi.com/showpic...            3.0   \n",
       "14  [{'url': 'http://store.is.autonavi.com/showpic...            3.5   \n",
       "15  [{'url': 'http://store.is.autonavi.com/showpic...            3.5   \n",
       "16  [{'url': 'http://store.is.autonavi.com/showpic...            3.5   \n",
       "\n",
       "   biz_ext.cost biz_ext.meal_ordering  \n",
       "0         12.00                     0  \n",
       "1            []                     0  \n",
       "2            []                     0  \n",
       "3         13.00                     0  \n",
       "4            []                     0  \n",
       "5            []                     0  \n",
       "6            []                     0  \n",
       "7         10.00                     0  \n",
       "8            []                     0  \n",
       "9            []                     0  \n",
       "10           []                     0  \n",
       "11        12.00                     0  \n",
       "12        17.00                     0  \n",
       "13           []                     0  \n",
       "14           []                     0  \n",
       "15        31.00                     0  \n",
       "16        10.00                   NaN  \n",
       "\n",
       "[17 rows x 22 columns]"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "parameters = {\n",
    "    'key':key,\n",
    "    'city':\"宁德\",\n",
    "    'keywords':\"酸菜水粉\",\n",
    "    'output':'json',\n",
    "}\n",
    "r = requests.get (\"https://restapi.amap.com/v3/place/text?parameters\", params=parameters)\n",
    "data = r.json()\n",
    "pois = []\n",
    "pois.extend(data['pois'])\n",
    "data\n",
    "import pandas as pd\n",
    "cot = pd.json_normalize(data['pois'])\n",
    "cot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>parent</th>\n",
       "      <th>childtype</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>typecode</th>\n",
       "      <th>biz_type</th>\n",
       "      <th>address</th>\n",
       "      <th>location</th>\n",
       "      <th>tel</th>\n",
       "      <th>distance</th>\n",
       "      <th>biz_ext</th>\n",
       "      <th>pname</th>\n",
       "      <th>cityname</th>\n",
       "      <th>adname</th>\n",
       "      <th>importance</th>\n",
       "      <th>shopid</th>\n",
       "      <th>shopinfo</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>photos</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>B0251030CM</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>南际牛肉水粉(南际店)</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>南漈路31号(近妇幼保健院)</td>\n",
       "      <td>119.525258,26.653500</td>\n",
       "      <td>13626997829;13950540202</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '4.0', 'cost': '12.00', 'meal_order...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>B0FFHBKV14</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>小东门牛肉水粉(福安店)</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>阳头富阳路38号</td>\n",
       "      <td>119.642638,27.077921</td>\n",
       "      <td>13959417128;13459389549</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '4.3', 'cost': [], 'meal_ordering':...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福安市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>B0FFHBGM7A</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>拓荣吴记牛肉水粉(宁德店)</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "      <td>diner</td>\n",
       "      <td>东侨经济开发区坪塔西路6号D幢D1-21</td>\n",
       "      <td>119.540414,26.655794</td>\n",
       "      <td>13959317416</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '4.8', 'cost': [], 'meal_ordering':...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>B0FFGI2E2L</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>福鼎小吃(万达金街店)</td>\n",
       "      <td>餐饮服务;中餐厅;特色/地方风味餐厅</td>\n",
       "      <td>050118</td>\n",
       "      <td>diner</td>\n",
       "      <td>天湖东路1号万达金街5-1063(四号门正对面)</td>\n",
       "      <td>119.540476,26.649324</td>\n",
       "      <td>18150238322;13774779702</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': '13.00', 'meal_order...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>B0FFGI2E4G</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>福鼎友小吃店</td>\n",
       "      <td>餐饮服务;中餐厅;特色/地方风味餐厅</td>\n",
       "      <td>050118</td>\n",
       "      <td>diner</td>\n",
       "      <td>站前路30号鸿福豪门3号楼137店面</td>\n",
       "      <td>119.541137,26.636966</td>\n",
       "      <td>15860688884;13959397419</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': [], 'meal_ordering':...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>B0FFHDZM8S</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>肉菜面店</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>东桥经济开发区城市公馆1号112店</td>\n",
       "      <td>119.544743,26.659764</td>\n",
       "      <td>13959300879</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.3', 'cost': [], 'meal_ordering':...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>B0FFFP3MKG</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>鞍福水粉</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>815西路2号东方大厦1号楼一层107-2</td>\n",
       "      <td>119.524688,26.658720</td>\n",
       "      <td>13809578343</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': [], 'meal_ordering':...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>B0FFG0K4EK</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>牛肉水粉(高级中学店)</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>东侨经济开发区高级中学东侧南华花苑C块01号106</td>\n",
       "      <td>119.547557,26.662807</td>\n",
       "      <td>18350377337</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': '10.00', 'meal_order...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>B0FFG44SGD</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>柘荣牛肉水粉店(人民影院后街店)</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>南环路好运商城一层后排第四间</td>\n",
       "      <td>119.527862,26.661987</td>\n",
       "      <td>13860399167;13959316378</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': [], 'meal_ordering':...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>B0FFGZSACY</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>柘荣牛肉水粉(单石碑店)</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>单石碑路41号</td>\n",
       "      <td>119.519060,26.670666</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': [], 'meal_ordering':...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B0FFIPOLQ7</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>五里亭牛肉水粉</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>东侨开发区闽东中路21号附近</td>\n",
       "      <td>119.544262,26.662716</td>\n",
       "      <td>15859363156</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': [], 'meal_ordering':...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>B0FFGHGL01</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>陈百万酸菜鱼粉丝(淡水桥店)</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "      <td>diner</td>\n",
       "      <td>桐城街道太姥大道484号</td>\n",
       "      <td>120.212837,27.309477</td>\n",
       "      <td>15259312115</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '5.0', 'cost': '12.00', 'meal_order...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福鼎市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>B0FFI0ROLA</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>爱勇酸菜鱼粉丝(海口路店)</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>桐城街道海口路125号</td>\n",
       "      <td>120.221195,27.315469</td>\n",
       "      <td>15659245671;15059315444</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': '17.00', 'meal_order...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福鼎市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>B0FFHG4XK7</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>阿勇酸菜鱼粉丝(海口路信用社)</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "      <td>diner</td>\n",
       "      <td>宏利五幢2号</td>\n",
       "      <td>120.221117,27.315381</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.0', 'cost': [], 'meal_ordering':...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福鼎市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>B0FFHDW4L6</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>猪猪虾水煮外卖</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>下宅园下路弄109-2号第一间至第二间</td>\n",
       "      <td>119.534370,26.653031</td>\n",
       "      <td>15159370959</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': [], 'meal_ordering':...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>蕉城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>B0FFFQ0O2M</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>春妹牛肉店(海口路店)</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>050100</td>\n",
       "      <td>diner</td>\n",
       "      <td>桐城海口路316号</td>\n",
       "      <td>120.221914,27.312186</td>\n",
       "      <td>0593-7851368;13055580328</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': '31.00', 'meal_order...</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福鼎市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>B0FFH6A5SB</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>黄家牛肉铺</td>\n",
       "      <td>购物服务;购物相关场所;购物相关场所</td>\n",
       "      <td>060000</td>\n",
       "      <td>[]</td>\n",
       "      <td>山前虹滨路79-81号</td>\n",
       "      <td>120.219751,27.329868</td>\n",
       "      <td>0593-7802578;0593-7378837;13023828282</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': '10.00'}</td>\n",
       "      <td>福建省</td>\n",
       "      <td>宁德市</td>\n",
       "      <td>福鼎市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            id parent childtype              name                type  \\\n",
       "0   B0251030CM     []        []       南际牛肉水粉(南际店)        餐饮服务;中餐厅;中餐厅   \n",
       "1   B0FFHBKV14     []        []      小东门牛肉水粉(福安店)        餐饮服务;中餐厅;中餐厅   \n",
       "2   B0FFHBGM7A     []        []     拓荣吴记牛肉水粉(宁德店)    餐饮服务;餐饮相关场所;餐饮相关   \n",
       "3   B0FFGI2E2L     []        []       福鼎小吃(万达金街店)  餐饮服务;中餐厅;特色/地方风味餐厅   \n",
       "4   B0FFGI2E4G     []        []            福鼎友小吃店  餐饮服务;中餐厅;特色/地方风味餐厅   \n",
       "5   B0FFHDZM8S     []        []              肉菜面店        餐饮服务;中餐厅;中餐厅   \n",
       "6   B0FFFP3MKG     []        []              鞍福水粉        餐饮服务;中餐厅;中餐厅   \n",
       "7   B0FFG0K4EK     []        []       牛肉水粉(高级中学店)        餐饮服务;快餐厅;快餐厅   \n",
       "8   B0FFG44SGD     []        []  柘荣牛肉水粉店(人民影院后街店)        餐饮服务;中餐厅;中餐厅   \n",
       "9   B0FFGZSACY     []        []      柘荣牛肉水粉(单石碑店)        餐饮服务;快餐厅;快餐厅   \n",
       "10  B0FFIPOLQ7     []        []           五里亭牛肉水粉        餐饮服务;快餐厅;快餐厅   \n",
       "11  B0FFGHGL01     []        []    陈百万酸菜鱼粉丝(淡水桥店)    餐饮服务;餐饮相关场所;餐饮相关   \n",
       "12  B0FFI0ROLA     []        []     爱勇酸菜鱼粉丝(海口路店)        餐饮服务;中餐厅;中餐厅   \n",
       "13  B0FFHG4XK7     []        []   阿勇酸菜鱼粉丝(海口路信用社)    餐饮服务;餐饮相关场所;餐饮相关   \n",
       "14  B0FFHDW4L6     []        []           猪猪虾水煮外卖        餐饮服务;快餐厅;快餐厅   \n",
       "15  B0FFFQ0O2M     []        []       春妹牛肉店(海口路店)        餐饮服务;中餐厅;中餐厅   \n",
       "16  B0FFH6A5SB     []        []             黄家牛肉铺  购物服务;购物相关场所;购物相关场所   \n",
       "\n",
       "   typecode biz_type                    address              location  \\\n",
       "0    050100    diner             南漈路31号(近妇幼保健院)  119.525258,26.653500   \n",
       "1    050100    diner                   阳头富阳路38号  119.642638,27.077921   \n",
       "2    050000    diner       东侨经济开发区坪塔西路6号D幢D1-21  119.540414,26.655794   \n",
       "3    050118    diner   天湖东路1号万达金街5-1063(四号门正对面)  119.540476,26.649324   \n",
       "4    050118    diner         站前路30号鸿福豪门3号楼137店面  119.541137,26.636966   \n",
       "5    050100    diner          东桥经济开发区城市公馆1号112店  119.544743,26.659764   \n",
       "6    050100    diner      815西路2号东方大厦1号楼一层107-2  119.524688,26.658720   \n",
       "7    050300    diner  东侨经济开发区高级中学东侧南华花苑C块01号106  119.547557,26.662807   \n",
       "8    050100    diner             南环路好运商城一层后排第四间  119.527862,26.661987   \n",
       "9    050300    diner                    单石碑路41号  119.519060,26.670666   \n",
       "10   050300    diner             东侨开发区闽东中路21号附近  119.544262,26.662716   \n",
       "11   050000    diner               桐城街道太姥大道484号  120.212837,27.309477   \n",
       "12   050100    diner                桐城街道海口路125号  120.221195,27.315469   \n",
       "13   050000    diner                     宏利五幢2号  120.221117,27.315381   \n",
       "14   050300    diner        下宅园下路弄109-2号第一间至第二间  119.534370,26.653031   \n",
       "15   050100    diner                  桐城海口路316号  120.221914,27.312186   \n",
       "16   060000       []                山前虹滨路79-81号  120.219751,27.329868   \n",
       "\n",
       "                                      tel distance  \\\n",
       "0                 13626997829;13950540202       []   \n",
       "1                 13959417128;13459389549       []   \n",
       "2                             13959317416       []   \n",
       "3                 18150238322;13774779702       []   \n",
       "4                 15860688884;13959397419       []   \n",
       "5                             13959300879       []   \n",
       "6                             13809578343       []   \n",
       "7                             18350377337       []   \n",
       "8                 13860399167;13959316378       []   \n",
       "9                                      []       []   \n",
       "10                            15859363156       []   \n",
       "11                            15259312115       []   \n",
       "12                15659245671;15059315444       []   \n",
       "13                                     []       []   \n",
       "14                            15159370959       []   \n",
       "15               0593-7851368;13055580328       []   \n",
       "16  0593-7802578;0593-7378837;13023828282       []   \n",
       "\n",
       "                                              biz_ext pname cityname adname  \\\n",
       "0   {'rating': '4.0', 'cost': '12.00', 'meal_order...   福建省      宁德市    蕉城区   \n",
       "1   {'rating': '4.3', 'cost': [], 'meal_ordering':...   福建省      宁德市    福安市   \n",
       "2   {'rating': '4.8', 'cost': [], 'meal_ordering':...   福建省      宁德市    蕉城区   \n",
       "3   {'rating': '3.5', 'cost': '13.00', 'meal_order...   福建省      宁德市    蕉城区   \n",
       "4   {'rating': '3.5', 'cost': [], 'meal_ordering':...   福建省      宁德市    蕉城区   \n",
       "5   {'rating': '3.3', 'cost': [], 'meal_ordering':...   福建省      宁德市    蕉城区   \n",
       "6   {'rating': '3.5', 'cost': [], 'meal_ordering':...   福建省      宁德市    蕉城区   \n",
       "7   {'rating': '3.5', 'cost': '10.00', 'meal_order...   福建省      宁德市    蕉城区   \n",
       "8   {'rating': '3.5', 'cost': [], 'meal_ordering':...   福建省      宁德市    蕉城区   \n",
       "9   {'rating': '3.5', 'cost': [], 'meal_ordering':...   福建省      宁德市    蕉城区   \n",
       "10  {'rating': '3.5', 'cost': [], 'meal_ordering':...   福建省      宁德市    蕉城区   \n",
       "11  {'rating': '5.0', 'cost': '12.00', 'meal_order...   福建省      宁德市    福鼎市   \n",
       "12  {'rating': '3.5', 'cost': '17.00', 'meal_order...   福建省      宁德市    福鼎市   \n",
       "13  {'rating': '3.0', 'cost': [], 'meal_ordering':...   福建省      宁德市    福鼎市   \n",
       "14  {'rating': '3.5', 'cost': [], 'meal_ordering':...   福建省      宁德市    蕉城区   \n",
       "15  {'rating': '3.5', 'cost': '31.00', 'meal_order...   福建省      宁德市    福鼎市   \n",
       "16                 {'rating': '3.5', 'cost': '10.00'}   福建省      宁德市    福鼎市   \n",
       "\n",
       "   importance shopid shopinfo poiweight  \\\n",
       "0          []     []        0        []   \n",
       "1          []     []        0        []   \n",
       "2          []     []        0        []   \n",
       "3          []     []        0        []   \n",
       "4          []     []        0        []   \n",
       "5          []     []        0        []   \n",
       "6          []     []        0        []   \n",
       "7          []     []        0        []   \n",
       "8          []     []        0        []   \n",
       "9          []     []        0        []   \n",
       "10         []     []        0        []   \n",
       "11         []     []        0        []   \n",
       "12         []     []        0        []   \n",
       "13         []     []        0        []   \n",
       "14         []     []        0        []   \n",
       "15         []     []        0        []   \n",
       "16         []     []        0        []   \n",
       "\n",
       "                                               photos  \n",
       "0   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "1   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "2   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "3   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "4   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "5   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "6   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "7   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "8   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "9   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "10  [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "11                                                 []  \n",
       "12  [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "13  [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "14  [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "15  [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "16  [{'url': 'http://store.is.autonavi.com/showpic...  "
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = poi(\"酸菜水粉\",\"宁德\")\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 该功能也许调用了AI的智能搜索引擎"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## IP定位"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "def ip(ip:str):\n",
    "    parameters = {\n",
    "        'key':key,\n",
    "        'ip':ip,\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/ip?parameters\", params=parameters)\n",
    "    data = r.json()\n",
    "    del data['status']\n",
    "    del data['info']\n",
    "    df = [\"省份：%s\"%(data['province']),\"地区：%s\"%(data['city']),\"地理编码：%s\"%(data['adcode']),\"经纬度： %s\"%(data['rectangle'])]\n",
    "    print(\"ip:\"+ip)\n",
    "    for i in df:\n",
    "        print(i)\n",
    "    return    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ip:120.35.179.228\n",
      "省份：福建省\n",
      "地区：漳州市\n",
      "地理编码：350600\n",
      "经纬度： 117.6063895,24.46234601;117.7375388,24.5646982\n"
     ]
    }
   ],
   "source": [
    "ip(\"120.35.179.228\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 静态地图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "def map(location:str,zoom:str):\n",
    "    parameters = {\n",
    "        'key':key,\n",
    "        'location':location,\n",
    "        'zoom':zoom,     \n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/staticmap?parameters\", params=parameters)\n",
    "    data = r.url\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'https://restapi.amap.com/v3/staticmap?parameters&key=e1f0b900eac097c28f03f98944417aca&location=119.539005%2C26.651663&zoom=18'"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "map(geo(\"福建省宁德市蕉城区万达广场\",\"宁德\"),18)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![0](https://restapi.amap.com/v3/staticmap?parameters&key=e1f0b900eac097c28f03f98944417aca&location=119.539005%2C26.651663&zoom=18)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 坐标转换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": [
    "def assistant(locations:str,coordsys:str):\n",
    "    parameters = {\n",
    "        'key':key,\n",
    "        'coordsys':coordsys,\n",
    "        'locations':locations,\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/assistant/coordinate/convert?parameters\", params=parameters)\n",
    "    data = r.json()['locations']\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'119.550147840712,26.65446858724'"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "assistant(\"119.54556,26.657959\",'gps')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 天气查询"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [],
   "source": [
    "def weather(city:str):\n",
    "    parameters = {\n",
    "        'key':key,\n",
    "        'city':city,\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/weather/weatherInfo?parameters\", params=parameters)\n",
    "    data = r.json()   \n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'lives': [{'province': '福建',\n",
       "   'city': '宁德市',\n",
       "   'adcode': '350900',\n",
       "   'weather': '阴',\n",
       "   'temperature': '12',\n",
       "   'winddirection': '西南',\n",
       "   'windpower': '≤3',\n",
       "   'humidity': '86',\n",
       "   'reporttime': '2020-04-23 21:25:31'}]}"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "weather('宁德')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 输入提示"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [],
   "source": [
    "def inputtips(keywords:str):\n",
    "    parameters = {\n",
    "        'key':key,\n",
    "        'keywords':keywords,\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/assistant/inputtips?parameters\", params=parameters)\n",
    "    data = r.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '10',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'tips': [{'id': 'B0FFHLLLH1',\n",
       "   'name': '宁德万达广场15幢',\n",
       "   'district': '福建省宁德市蕉城区',\n",
       "   'adcode': '350902',\n",
       "   'location': '119.539015,26.649000',\n",
       "   'address': [],\n",
       "   'typecode': '190403',\n",
       "   'city': []},\n",
       "  {'id': 'B02510373C',\n",
       "   'name': '万达广场(宁德店)',\n",
       "   'district': '福建省宁德市蕉城区',\n",
       "   'adcode': '350902',\n",
       "   'location': '119.53897,26.651728',\n",
       "   'address': '天湖东路1号',\n",
       "   'typecode': '060101',\n",
       "   'city': []},\n",
       "  {'id': 'B02510PNGQ',\n",
       "   'name': '万达广场(5号门)',\n",
       "   'district': '福建省宁德市蕉城区',\n",
       "   'adcode': '350902',\n",
       "   'location': '119.539108,26.651017',\n",
       "   'address': '天湖东路1号万达广场1F层',\n",
       "   'typecode': '991000',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFLLIWL6',\n",
       "   'name': 'DANIEL WELLINGTON(宁德万达广场店)',\n",
       "   'district': '福建省宁德市蕉城区',\n",
       "   'adcode': '350902',\n",
       "   'location': '119.538585,26.651852',\n",
       "   'address': '天湖东路1号万达广场一楼',\n",
       "   'typecode': '061200',\n",
       "   'city': []},\n",
       "  {'id': 'B02510PRH8',\n",
       "   'name': 'H&M(万达广场店)',\n",
       "   'district': '福建省宁德市蕉城区',\n",
       "   'adcode': '350902',\n",
       "   'location': '119.539309,26.652278',\n",
       "   'address': '天湖东路1号万达广场万达百货1层',\n",
       "   'typecode': '061101',\n",
       "   'city': []},\n",
       "  {'id': 'B02510P7UP',\n",
       "   'name': '万达广场(7号门)',\n",
       "   'district': '福建省宁德市蕉城区',\n",
       "   'adcode': '350902',\n",
       "   'location': '119.538050,26.651087',\n",
       "   'address': '天湖东路1号万达广场1F层',\n",
       "   'typecode': '991000',\n",
       "   'city': []},\n",
       "  {'id': 'B02510PKT1',\n",
       "   'name': '万达广场(1号门)',\n",
       "   'district': '福建省宁德市蕉城区',\n",
       "   'adcode': '350902',\n",
       "   'location': '119.537920,26.651507',\n",
       "   'address': '天湖东路1号万达广场1F层',\n",
       "   'typecode': '991001',\n",
       "   'city': []},\n",
       "  {'id': 'BV10212787',\n",
       "   'name': '万达广场(公交站)',\n",
       "   'district': '福建省宁德市蕉城区',\n",
       "   'adcode': '350902',\n",
       "   'location': '119.539238,26.652830',\n",
       "   'address': '17路;18路;20(1)路;20路(1)线;20路(2)线;22路;23路;28路;30路;31路;3路;4路;7路;9路接送专线',\n",
       "   'typecode': '150700',\n",
       "   'city': []},\n",
       "  {'id': 'B02510PRHD',\n",
       "   'name': 'Lee(万达广场)',\n",
       "   'district': '福建省宁德市蕉城区',\n",
       "   'adcode': '350902',\n",
       "   'location': '119.539829,26.652025',\n",
       "   'address': '天湖东路1号万达广场万达百货1层132B、133',\n",
       "   'typecode': '061101',\n",
       "   'city': []},\n",
       "  {'id': 'B02510PRH0',\n",
       "   'name': 'DQ(万达广场)',\n",
       "   'district': '福建省宁德市蕉城区',\n",
       "   'adcode': '350902',\n",
       "   'location': '119.538937,26.651403',\n",
       "   'address': '天湖东路1号万达广场万达百货3层365',\n",
       "   'typecode': '050700',\n",
       "   'city': []}]}"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "inputtips(\"宁德万达广场\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## API应用\n",
    "\n",
    "## 独行侠 —— 单人旅行规划APP\n",
    "\n",
    "### 所调用的高德地图API：\n",
    "1. 路径规划\n",
    "2. 搜索POI\n",
    "3. 静态地图\n",
    "\n",
    "### 产品功能描述\n",
    "本APP旨在通过调用高德地图的API，让倾向于独自旅行的用户能够使用搜索POI功能找到自己感兴趣的地点，再使用路径规划功能提前规划好行动路线，并使用静态地图来帮助自己确认目的地位置。\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
